<?php 

namespace app\common\validate\equipment;

use think\Validate;

class Equipment extends Validate 
{ 
    protected $rule = [
        'equipment_number' => 'require',
        'equipment_name' => 'require',
        'equipment_ip' => 'require',
        'equipment_position_id' => 'require',
    ];

    protected $message = [
        'equipment_number.require' => '请输入设备编码',
        'equipment_name.require' => '请输入名称',
        'equipment_ip.require' => '请输入设备地址',
        'equipment_position_id.require' => '请输入设备出入口ID',
    ];

    protected $scene = [
        'edit' => ['equipment_number','equipment_name','equipment_ip','equipment_position_id','admin_name','remark','id'],
        'add' => ['equipment_number','equipment_name','equipment_ip','equipment_position_id','admin_name','remark'],
    ];

} 
